﻿@model  List<NFine.Domain._03_Entity.Biz.UserBankEntity>
@{
    ViewBag.Title = "提现账户";
    Layout = "~/Areas/WeiXinAreas/Views/Shared/_LayoutWeui.cshtml";
}
<style>
    .card {
        border-radius: 0.3rem;
        float: left;
        padding-top: 0.5rem;
        padding-left: 0.5rem;
        background-color: #35a4fe;
        color: #fff;
        height: 3.5rem;
        line-height: 1.5rem;
    }
    a{
        color:#000;
    }
</style>
<div class="weui-cells" style="margin-top:0rem;">
    @*<div class="weui-cell">
        <div class="weui-cell__bd card">
            <div>建设银行</div>
            <div>**** **** **** 3194</div>
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__bd card">
            <div>河北银行</div>
            <div>**** **** **** 3194</div>
        </div>
    </div>*@

    @{
        if (Model != null && Model.Count > 0)
        {
            foreach (var card in Model)
            {
                <div class="weui-cell" >
                    <div class="weui-cell__bd" style="line-height:1.4rem;">
                        <a onclick="location.replace('TX?cId=@card.F_Id')">
                            <div style="float: left;width:80%">
                                <div>@card.F_BankName</div>
                                <div style="color: #666;">**** **** **** @Html.Raw(card.F_Account.Substring(card.F_Account.Length - 4))</div>
                        </div>
                    </a>
                        <div style="float:right;margin-top:0.6rem"><img src="~/Content/M/img/del.png" style="width:1.5rem;"  onclick="del('@card.F_Id')"/> </div>
                    </div>
                </div>
            }
        }
    }
    <a class="weui-cell weui-cell_access" href="~/WeiXinAreas/Main/addAccount">
        <div class="weui-cell__hd"><img src="~/Content/M/img/add.png" style="width:1.5rem;" /> </div>
        <div class="weui-cell__bd" style="font-size:0.7rem">
            添加卡片
        </div>
        <div class="weui-cell__ft">
        </div>
    </a>
</div>
@section footScript
{
    <script type="text/javascript">

    function del(id)
    {
        $.confirm({
            title: '提示',
            text: '确定删除该银行卡信息吗？',
            onOK: function () {
                $.ajax({
                    url: "delAccount",
                    data: {cid:id},
                    dataType: 'json',
                    type: 'post',
                    success: function (_data) {
                        if (_data > 0) {
                           //$.toptip('删除成功！', 2000, 'success');
                            location.replace("Account");
                        } else {
                            $.toptip('删除失败！',  'error');
                        }
                    }
                });
            }
        });
    }
    </script>
}